﻿using System;
using BestCode.Creds.Business;
using BestCode.Creds.Data;
using BestCode.Creds.Data.MapHelper;
using BestCode.Creds.Entities;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NHibernate.Criterion;
using  System.Linq;

namespace BestCode.Creds.Test
{
    [TestClass]
    public class TemplateTest
    {
        [TestMethod]
        public void SearchTemplateTest()
        {
            TemplateBusiness business = new TemplateBusiness();
            var datas = business.SearchByFilter("");
            var all = business.GetAll();


            Template template = new Template();
            template.Code = "CODE";
            template.Name = "NAME";
            template.FaceImagePath = "DATATTTTT";
            business.Save(template);

            var finded = business.Get(template.Id);
            finded.Name = "UPDATED!!!";
            business.Save(finded);

            

            business.Delete(template);




            var all2 = business.GetAll();

        }


        [TestMethod]
        public void TestReportSummary()
        {
            ReportReader reader= new ReportReader();
            var result = reader.GetSummary();

        }
    }
}
